//表单配置
{
  "form": {
    "inline": false,
    "hideRequiredAsterisk": false,
    "labelPosition": "left",
    "size": "default",
    "labelWidth": "80px"
  },
  "resetBtn": {
    "show": false,
    "innerText": "重置"
  },
  "submitBtn": {
    "show": false,
    "innerText": "提交"
  }
}


//渲染规则
[
  {
    "type": "fcInlineForm",
    "_fc_id": "id_Fj4tmg3ceiuuabc",
    "name": "ref_Foxemg3ceiuuacc",
    "_fc_drag_tag": "fcInlineForm",
    "children": [
      {
        "type": "input",
        "field": "name",
        "title": "用户名",
        "$required": false,
        "_fc_id": "id_Fbchmg3cen3jaec",
        "name": "ref_F722mg3cen3jafc",
        "_fc_drag_tag": "input",
        "col": {
          "span": 24
        },
        "wrap": {
          "labelWidth": "66px"
        },
        "display": true,
        "hidden": false
      },
      {
        "type": "select",
        "field": "state",
        "title": "状态",
        "effect": {
          "fetch": {
            "action": "http://127.0.0.1:9000/",
            "method": "GET",
            "dataType": "json",
            "headers": {},
            "query": {},
            "data": {},
            "parse": "[[FORM-CREATE-PREFIX-function (res, rule, api){\nconst data = [{label:'1',value:'1'}]\nrule.options = [...data]\n}-FORM-CREATE-SUFFIX]]",
            "beforeFetch": "",
            "onError": "",
            "to": "options"
          }
        },
        "$required": false,
        "_fc_id": "id_Fuwomg3cephqajc",
        "name": "ref_Fxjgmg3cephqakc",
        "_fc_drag_tag": "select",
        "style": {
          "marginLeft": "0px",
          "letterSpacing": "0px"
        },
        "props": {
          "clearable": true,
          "collapseTags": true,
          "filterable": true,
          "_optionType": 3
        },
        "wrap": {
          "labelWidth": "66px",
          "class": "fc-wrap-right"
        },
        "display": true,
        "hidden": false,
        "options": [
          {
            "label": "1",
            "value": "1"
          }
        ]
      },
      {
        "type": "elButton",
        "props": {
          "type": "primary"
        },
        "children": [
          "搜索"
        ],
        "_fc_id": "id_Fsnemg3cnic0b9c",
        "name": "ref_F68cmg3cnic0bac",
        "$easySlots": {
          "icon": {
            "type": "icon",
            "value": "icon-search"
          }
        },
        "_fc_drag_tag": "elButton",
        "style": {
          "marginLeft": "10px"
        },
        "display": true,
        "hidden": false
      },
      {
        "type": "elButton",
        "children": [
          "重置"
        ],
        "_fc_id": "id_F7zvmg3cnjqkbbc",
        "name": "ref_Ff4amg3cnjqkbcc",
        "$easySlots": {
          "icon": {
            "type": "icon",
            "value": "icon-refresh"
          }
        },
        "_fc_drag_tag": "elButton",
        "display": true,
        "hidden": false
      }
    ],
    "display": true,
    "hidden": false
  },
  {
    "type": "fcInlineForm",
    "_fc_id": "id_Fy9vmg3cosodbfc",
    "name": "ref_Foltmg3cosodbgc",
    "_fc_drag_tag": "fcInlineForm",
    "children": [
      {
        "type": "elButton",
        "props": {
          "type": "primary"
        },
        "children": [
          "新增"
        ],
        "_fc_id": "id_Ffg2mg3cowd2bhc",
        "name": "ref_F4mkmg3cowd2bic",
        "$easySlots": {
          "icon": {
            "type": "icon",
            "value": "icon-add2"
          }
        },
        "_fc_drag_tag": "elButton",
        "display": true,
        "hidden": false,
        "on": {
          "click": "$FNX:const {api} = $inject\napi.open('ref_Fgmfmg3d3mrtagc')\napi.setData('close',()=>{\n  api.close('ref_Fgmfmg3d3mrtagc')\n})"
        }
      }
    ],
    "style": {
      "marginBottom": "10px"
    },
    "display": true,
    "hidden": false
  },
  {
    "type": "dataTable",
    "native": true,
    "props": {
      "height": "500px",
      "button": {
        "open": true,
        "column": [
          {
            "key": 1,
            "name": "编辑",
            "prop": [
              "link"
            ],
            "type": "primary",
            "click": "[[FORM-CREATE-PREFIX-function (scope, api){\nconst {row} = scope\napi.setData('params',{...row})\napi.open('ref_F2wfmg3dhhs1dhc')\napi.setData('close',()=>{\n  api.close('ref_F2wfmg3dhhs1dhc')\n  api.removeData('params')\n})\n}-FORM-CREATE-SUFFIX]]"
          },
          {
            "key": 2,
            "name": "详情",
            "prop": [
              "link"
            ],
            "type": "warning",
            "click": "[[FORM-CREATE-PREFIX-function (scope, api){\nconst {row} = scope\napi.setData('params',{...row})\napi.setData('close',()=>{\n  api.close('ref_Fm61mg3dhj02djc')\n  api.remmoveData('params')\n})\napi.open('ref_Fm61mg3dhj02djc')\n}-FORM-CREATE-SUFFIX]]"
          },
          {
            "key": 3,
            "name": "删除",
            "prop": [
              "link"
            ],
            "type": "danger"
          }
        ],
        "width": "180px",
        "label": "操作"
      },
      "column": [
        {
          "format": "default",
          "prop": "date",
          "label": "出生日期",
          "width": "150",
          "id": "Fo14mg3cppybbmc"
        },
        {
          "format": "default",
          "prop": "name",
          "label": "姓名",
          "width": "120",
          "id": "F0pzmg3cppybbnc"
        },
        {
          "format": "default",
          "prop": "state",
          "label": "状态",
          "width": "120",
          "id": "Fcjrmg3cppybboc"
        },
        {
          "format": "default",
          "prop": "city",
          "label": "城市",
          "width": "120",
          "id": "F0shmg3cppybbpc"
        },
        {
          "format": "default",
          "prop": "address",
          "label": "详细地址",
          "width": "",
          "id": "Fo5cmg3cppybbqc"
        },
        {
          "format": "default",
          "prop": "zip",
          "label": "Zip",
          "width": "120",
          "id": "Fcpvmg3cppybbrc"
        }
      ],
      "page": {
        "open": true,
        "props": {
          "pageSize": 10,
          "small": true,
          "background": true
        },
        "totalField": "total",
        "dataField": "list",
        "pageField": "page",
        "pageSizeField": "limit"
      },
      "selection": true,
      "index": true,
      "stripe": true,
      "border": true,
      "_optionType": 2,
      "fetch": {
        "parse": "[[FORM-CREATE-PREFIX-function (res, rule, api){\nconst testData = []\nfor(let i = 0;i<10;i++){\n  testData.push({\n   \"id\":Math.random().toString().slice(-8),\n  \"date\": \"2016-05-12\",\n  \"name\": \"Tom 10\",\n  \"state\": \"California\",\n  \"city\": \"Los Angeles\",\n  \"address\": \"No. 189, Grove St, Los Angeles\",\n  \"zip\": \"CA 90036\"\n  })\n}\nconst data = {\n  list:[...testData],\n  total:1000,\n  page:1,\n  limit:10\n}\nreturn data\n}-FORM-CREATE-SUFFIX]]",
        "beforeFetch": "",
        "onError": "",
        "to": "options",
        "action": "http://127.0.0.1:9000/",
        "method": "GET",
        "dataType": "json",
        "headers": {},
        "query": {},
        "data": {}
      }
    },
    "_fc_id": "id_Frl1mg3cpjt1bkc",
    "name": "ref_Fb8umg3cpjt1blc",
    "_fc_drag_tag": "dataTable",
    "display": true,
    "hidden": false
  },
  {
    "type": "fcDialog",
    "props": {
      "title": "新增",
      "autoClose": false,
      "rule": [
        {
          "type": "input",
          "field": "name",
          "title": "姓名",
          "$required": true,
          "_fc_id": "id_Fsdwmg3d7wn1avc",
          "name": "ref_Ff3gmg3d7wn1awc",
          "display": true,
          "hidden": false,
          "_fc_drag_tag": "input"
        },
        {
          "type": "input",
          "field": "date",
          "title": "出生日期",
          "$required": true,
          "_fc_id": "id_Frdgmg3d7xleb0c",
          "name": "ref_F5rxmg3d7xleb1c",
          "display": true,
          "hidden": false,
          "_fc_drag_tag": "input"
        },
        {
          "type": "input",
          "field": "state",
          "title": "状态",
          "$required": true,
          "_fc_id": "id_F9v6mg3d80z6b5c",
          "name": "ref_Ftnimg3d80z6b6c",
          "display": true,
          "hidden": false,
          "_fc_drag_tag": "input"
        },
        {
          "type": "input",
          "field": "city",
          "title": "城市",
          "$required": true,
          "_fc_id": "id_Fmwumg3d8251bac",
          "name": "ref_Fhzlmg3d8251bbc",
          "display": true,
          "hidden": false,
          "_fc_drag_tag": "input"
        },
        {
          "type": "input",
          "field": "address",
          "title": "详细地址",
          "$required": true,
          "_fc_id": "id_F7djmg3d834bbfc",
          "name": "ref_F2vdmg3d834bbgc",
          "display": true,
          "hidden": false,
          "_fc_drag_tag": "input"
        },
        {
          "type": "input",
          "field": "zip",
          "title": "zip",
          "$required": true,
          "_fc_id": "id_Fk2vmg3d8483bkc",
          "name": "ref_Fzfzmg3d8483blc",
          "display": true,
          "hidden": false,
          "_fc_drag_tag": "input"
        }
      ]
    },
    "native": true,
    "ignore": true,
    "_fc_id": "id_Fmc3mg3d3mrtafc",
    "name": "ref_Fgmfmg3d3mrtagc",
    "field": "F9ccmg3d3mrtahc",
    "display": true,
    "hidden": false,
    "_fc_drag_tag": "fcDialog",
    "on": {
      "submit": "$FNX:const api = $inject.api.el('ref_Fgmfmg3d3mrtagc').fapi\napi.validate().then(res=>{\n  const formData = api.formData()\n  console.log(formData,'formData')\n  api.getData('close') && api.getData('close')()\n}).catch(err=>{\n  \n})",
      "close": "$FNX:const api = $inject.api.el('ref_Fgmfmg3d3mrtagc').fapi\napi.resetFields()"
    }
  },
  {
    "type": "fcDialog",
    "props": {
      "title": "编辑",
      "autoClose": false,
      "rule": [
        {
          "type": "input",
          "field": "name",
          "title": "姓名",
          "$required": true,
          "_fc_id": "id_Fsdwmg3d7wn1avc",
          "name": "ref_Ff3gmg3d7wn1awc",
          "display": true,
          "hidden": false,
          "_fc_drag_tag": "input"
        },
        {
          "type": "input",
          "field": "date",
          "title": "出生日期",
          "$required": true,
          "_fc_id": "id_Frdgmg3d7xleb0c",
          "name": "ref_F5rxmg3d7xleb1c",
          "display": true,
          "hidden": false,
          "_fc_drag_tag": "input"
        },
        {
          "type": "input",
          "field": "state",
          "title": "状态",
          "$required": true,
          "_fc_id": "id_F9v6mg3d80z6b5c",
          "name": "ref_Ftnimg3d80z6b6c",
          "display": true,
          "hidden": false,
          "_fc_drag_tag": "input"
        },
        {
          "type": "input",
          "field": "city",
          "title": "城市",
          "$required": true,
          "_fc_id": "id_Fmwumg3d8251bac",
          "name": "ref_Fhzlmg3d8251bbc",
          "display": true,
          "hidden": false,
          "_fc_drag_tag": "input"
        },
        {
          "type": "input",
          "field": "address",
          "title": "详细地址",
          "$required": true,
          "_fc_id": "id_F7djmg3d834bbfc",
          "name": "ref_F2vdmg3d834bbgc",
          "display": true,
          "hidden": false,
          "_fc_drag_tag": "input"
        },
        {
          "type": "input",
          "field": "zip",
          "title": "zip",
          "$required": true,
          "_fc_id": "id_Fk2vmg3d8483bkc",
          "name": "ref_Fzfzmg3d8483blc",
          "display": true,
          "hidden": false,
          "_fc_drag_tag": "input"
        }
      ]
    },
    "native": true,
    "ignore": true,
    "_fc_id": "id_F8l6mg3dhhs1dic",
    "name": "ref_F2wfmg3dhhs1dhc",
    "field": "F9ccmg3d3mrtahc",
    "display": true,
    "hidden": false,
    "_fc_drag_tag": "fcDialog",
    "on": {
      "submit": "$FNX:const api = $inject.api.el('ref_F2wfmg3dhhs1dhc').fapi\napi.validate().then(res=>{\n  const formData = api.formData()\n  console.log(formData,'formData')\n  api.getData('close') && api.getData('close')()\n}).catch(err=>{\n  \n})",
      "close": "$FNX:const api = $inject.api.el('ref_F2wfmg3dhhs1dhc').fapi\napi.resetFields()",
      "open": "$FNX:const api = $inject.api.el('ref_F2wfmg3dhhs1dhc').fapi\nconst params = api.getData('params')\nif(params.id){\n  const testData = {\n    name:'张三',\n    state:'1',\n    city:'福州',\n    address:'9号'\n  }\n  api.setValue({...testData})\n}"
    },
    "title": "编辑"
  },
  {
    "type": "fcDialog",
    "props": {
      "title": "详情",
      "autoClose": false,
      "preview": true,
      "footer": false,
      "rule": [
        {
          "type": "input",
          "field": "name",
          "title": "姓名",
          "$required": true,
          "_fc_id": "id_Fsdwmg3d7wn1avc",
          "name": "ref_Ff3gmg3d7wn1awc",
          "display": true,
          "hidden": false,
          "_fc_drag_tag": "input"
        },
        {
          "type": "input",
          "field": "date",
          "title": "出生日期",
          "$required": true,
          "_fc_id": "id_Frdgmg3d7xleb0c",
          "name": "ref_F5rxmg3d7xleb1c",
          "display": true,
          "hidden": false,
          "_fc_drag_tag": "input"
        },
        {
          "type": "input",
          "field": "state",
          "title": "状态",
          "$required": true,
          "_fc_id": "id_F9v6mg3d80z6b5c",
          "name": "ref_Ftnimg3d80z6b6c",
          "display": true,
          "hidden": false,
          "_fc_drag_tag": "input"
        },
        {
          "type": "input",
          "field": "city",
          "title": "城市",
          "$required": true,
          "_fc_id": "id_Fmwumg3d8251bac",
          "name": "ref_Fhzlmg3d8251bbc",
          "display": true,
          "hidden": false,
          "_fc_drag_tag": "input"
        },
        {
          "type": "input",
          "field": "address",
          "title": "详细地址",
          "$required": true,
          "_fc_id": "id_F7djmg3d834bbfc",
          "name": "ref_F2vdmg3d834bbgc",
          "display": true,
          "hidden": false,
          "_fc_drag_tag": "input"
        },
        {
          "type": "input",
          "field": "zip",
          "title": "zip",
          "$required": true,
          "_fc_id": "id_Fk2vmg3d8483bkc",
          "name": "ref_Fzfzmg3d8483blc",
          "display": true,
          "hidden": false,
          "_fc_drag_tag": "input"
        }
      ]
    },
    "native": true,
    "ignore": true,
    "_fc_id": "id_Ftiimg3dhj02dkc",
    "name": "ref_Fm61mg3dhj02djc",
    "field": "F9ccmg3d3mrtahc",
    "display": true,
    "hidden": false,
    "_fc_drag_tag": "fcDialog",
    "on": {
      "submit": "$FNX:const api = $inject.api.el('ref_Fm61mg3dhj02djc').fapi\napi.validate().then(res=>{\n  const formData = api.formData()\n  console.log(formData,'formData')\n  api.getData('close') && api.getData('close')()\n}).catch(err=>{\n  \n})",
      "close": "$FNX:const api = $inject.api.el('ref_Fm61mg3dhj02djc').fapi\napi.resetFields()",
      "open": "$FNX:const api = $inject.api.el('ref_Fm61mg3dhj02djc').fapi\nconst params = api.getData('params')\nif(params.id){\n  const testData = {\n    name:'张三-详情',\n    state:'1',\n    city:'福州',\n    address:'9号'\n  }\n  api.setValue({...testData})\n}"
    }
  }
]